<?php /* Smarty version Smarty-3.1.18, created on 2015-08-15 12:01:38
         compiled from "E:\www\gfour\Mobile\View\gf\Vote\index.html" */ ?>
<?php /*%%SmartyHeaderCode:2757655ce2b59d1d333-01257141%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '59b196ab1a6a1377d1bce1472469f12f748e0c48' => 
    array (
      0 => 'E:\\www\\gfour\\Mobile\\View\\gf\\Vote\\index.html',
      1 => 1439605198,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2757655ce2b59d1d333-01257141',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_55ce2b59d7edc3_47270043',
  'variables' => 
  array (
    '_C' => 0,
    'vote' => 0,
    'key' => 0,
    'option' => 0,
    'jsdk' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_55ce2b59d7edc3_47270043')) {function content_55ce2b59d7edc3_47270043($_smarty_tpl) {?><!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type">
		<meta content="text/html; charset=utf-8">
		<meta charset="utf-8">
		<title>今日话题</title>
		<meta name="description" content="<?php echo $_smarty_tpl->tpl_vars['_C']->value['site_des'];?>
">
		<meta name="keywords" content="<?php echo $_smarty_tpl->tpl_vars['_C']->value['site_keyword'];?>
">		
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<meta name="format-detection" content="email=no">        
		
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/load.css" /> 
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/index.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/animations.css" />
	</head>       
      
	<body>
		<div id="content" class="hudong">
			<form class="jp-wrap">
			<div class="page page-1-1 page-current">
				<div class="wrap">
					<a href="index.html" class="backToIndex"><img src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/p3_return.png" class=" page-moveCircle"></a>
 					<div class="textarea page-moveScale page-delay300">
 						<b><?php echo $_smarty_tpl->tpl_vars['vote']->value['name'];?>
</b>
 						<img src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/p2_textarea.png" class="page-moveScale textarea_bg">
 					</div>
 					<div class="choice page-moveScale page-delay300" style="margin-bottom:20px">
 						<p>请选择：</p>
 						<ul>
 							<?php  $_smarty_tpl->tpl_vars['option'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['option']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['vote']->value['option']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['option']->key => $_smarty_tpl->tpl_vars['option']->value) {
$_smarty_tpl->tpl_vars['option']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['option']->key;
?>
							
 							<li>
 								<?php if ($_smarty_tpl->tpl_vars['key']->value==0) {?>
								A.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==1) {?>
								B.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==2) {?>
								C.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==3) {?>
								D.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==4) {?>
								E.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==5) {?>
								F.
								<?php } elseif ($_smarty_tpl->tpl_vars['key']->value==6) {?>
								G.
								<?php }?>
								<?php echo $_smarty_tpl->tpl_vars['option']->value['name'];?>
<input value="<?php echo $_smarty_tpl->tpl_vars['option']->value['id'];?>
"   type="radio" name="danxuan" id="c<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" /><label class="white_block" for="c<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
"></label></li>
 							<?php } ?>
 						</ul>
 						<img src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/p3_choose.png" class="page-moveFromBottomFade choose_bg">
 					</div>
 					<div class="submit_wrapper">
 						<input  value="<?php echo $_smarty_tpl->tpl_vars['vote']->value['id'];?>
" name="vid" type="hidden">
 						<img   data-type="yes" class="btn submit yf-post page-moveFromBottomFade page-delay1200" src="./<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
images/p3_btn.png" />
 					</div>
 					<p class="foot">本页面由广州电视台G4提供</p>
				</div>
			</div>
			</form>
    	</div>	
		
	
<div class="alert" id="alert2" style="padding:15px">
		
			<div id="msg" class="fs3"></div>
			
			
			<a href="javascript:void(0)" class="alert-btn fc1 fs3">确定</a>
			
		</div>
		
        <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/zepto.min.js"></script>
		<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/main.js"></script>
		<script src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/yf.js"></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script>
			
				function showMsg(msg)
			{
					$("#msg").text(msg);
					$('div#alert2').show();
			}
			$(function(){
				
				$('a.alert-btn').click(function (e) {
					$('div.alert').hide();
					});
					
				$('.yf-post').click(function(){
					
					
					var _this = $(this);
					var type = _this.attr('data-type');
					if(type == 'done')
					{
						showMsg("您已成功提交");
					}
					else if(type == 'yes')
					{
						var data = {};
						var data_arr = $('form').serialize().replace(/\+/g,' ').split('&');
						for(var i=0;i<data_arr.length;i++)
						{
							var temp=data_arr[i].split('=');
							if(typeof(data[hungry.util.utf8_decode(temp[0])])!='undefined')
							{
								var arr=[];
								if(data[hungry.util.utf8_decode(temp[0])] instanceof Array)
								{
									arr=data[hungry.util.utf8_decode(temp[0])];
								}
								else
								{
									arr.push(data[hungry.util.utf8_decode(temp[0])]);
								}
									arr.push(hungry.util.utf8_decode(temp[1]));
									data[hungry.util.utf8_decode(temp[0])]=arr;
							}
							else
							{
								data[hungry.util.utf8_decode(temp[0])]=hungry.util.utf8_decode(temp[1]);
							}
						}
						_this.attr('data-type', 'no');
						_this.text('提交中');
						$.post('index.php?g=mobile&m=vote&a=send_vote',data,function(result){
							if(result.error == 0)
							{
								showMsg(result.content);
								//location.reload();
								_this.attr('data-type', 'done');
							}
							else
							{
								
								showMsg(result.content);
								_this.attr('data-type', 'yes');
								_this.text('提交');
							}
						},'json');
					}
					else
					{
						showMsg("数据提交中");
					}
				});
			});
			
				
				wx.config({
				debug: false,
				appId: '<?php echo $_smarty_tpl->tpl_vars['jsdk']->value['appId'];?>
',
				timestamp: <?php echo $_smarty_tpl->tpl_vars['jsdk']->value['timestamp'];?>
,
				nonceStr: '<?php echo $_smarty_tpl->tpl_vars['jsdk']->value['nonceStr'];?>
',
				signature: '<?php echo $_smarty_tpl->tpl_vars['jsdk']->value['signature'];?>
',
				jsApiList: [
			
					 'onMenuShareTimeline',
		      'onMenuShareAppMessage'
				]
			});
			
			var images = {
				    localId: [],
				    serverId: []
				  };
			
			wx.ready(function(){
				
				
				
				
				 wx.onMenuShareTimeline({
    
    title: '今日话题',
   
  imgUrl: 'http://yf.lly360.com/Mobile/Webroot/gf/images/share-vote.png',
  
      trigger: function (res) {
       
      },
      success: function (res) {
       			
			
      },
      cancel: function (res) {
       
      },
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });
    
	wx.onMenuShareAppMessage({
   // link:'http://wxyx.weidianit.com/index.php?g=home&m=shake&a=index&pid='+pid,
     title: '今日话题',
    desc: '今日话题，热点讨论！',
  imgUrl: 'http://yf.lly360.com/Mobile/Webroot/gf/images/share-vote.png',
    success: function () { 
	
			
				
    },
    cancel: function () { 
        // 用户取消分享后执行的回调函数
    }
});
				
				});
				
		</script>
	</body>
</html>
<?php }} ?>
